package org.dtrd.modules.evaluation.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.evaluation.entity.bean.parq.ParqDetail;

import java.util.Date;


/**
 * <p>
 * 
 * </p>
 *
 * @author xiao
 * @since 2022-08-15
 */
@Getter
@Setter
@TableName("dtrd_ent_evaluation_rd_parq")
public class DtrdEntEvaluationRdParq {

    @TableId(value = "data_id", type = IdType.AUTO)
    private Integer dataId;

    @TableField("is_del")
    @TableLogic
    private Integer isDel;

    /**
     * 患者ID
     */
    @TableField("patient_id")
    private Integer patientId;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 输入的结果，int数组
     */
    @TableField("input")
    private String input;

    /**
     * 计算后的得分
     */
    @TableField("score")
    private Integer score;

    /**
     * 返回评估结果
     */
    @TableField("output")
    private String output;

    public DtrdEntEvaluationRdParq init() {
        this.isDel = 0;
        this.createTime = new Date();
        return this;
    }

    public DtrdEntEvaluationRdParq parseFromDto(ParqDetail dto) {
        this.dataId = dto.getDataId();
        this.patientId = dto.getPatientId();
        return this;
    }


}
